/* ---------------------------------------------------------------------------
** Buffer.cpp
** 	The Buffer class holds the last received package
**
** Author: Roel Postelmans
** -------------------------------------------------------------------------*/ 
#include "buffer.h"

//using namespace std;
using std::cout;
struct Package; 
struct Udp_package;
struct Udp_header;
struct Info;

Package Buffer::package;

void Buffer::set_package(Udp_package udp_package, int nr) {
   /*No object gedetecteerd*/
   if(udp_package.info_b.robx==-1)
       return;
   package.nr=nr;
   package.udp_package=&udp_package;
}
Package Buffer::get_package() {
#ifdef DEBUG
   //cout <<"Sequentienr: " << package.nr <<" xco:"<< package.udp_package->info_b.robx<<" yco: "<<package.udp_package->info_b.roby<<"\n";
#endif 
   return package; 
}


